package com.oracle.common;

import com.oracle.vo.Boy;
import com.oracle.vo.Girl;
import org.springframework.stereotype.Component;

/**
 * @program: CampusMatching
 * @description:布隆过滤器字符串转化器
 * @author: zhaolei
 * @create: 2020-08-04 19:23
 **/
@Component
public class BloomStringProcess {

    public  String process(Object obj){
        String res=null;
        if(obj.getClass()==Boy.class){
          res =boyprocess((Boy)obj);
        }else  if(obj.getClass()==Girl.class){
          res = gprocesss((Girl)obj);
        }
        System.out.println(res);
        return  res;
    }

    public String boyprocess(Boy boy){
        StringBuffer su=new StringBuffer();
        StringBuffer append = su.append(boy.getBname() + boy.getBschool() + boy.getBvx());
        return  append.toString();
    }

    public  String gprocesss(Girl girl){
        StringBuffer su=new StringBuffer();
        StringBuffer append = su.append(girl.getGname() + girl.getGschool() + girl.getGvx());
        return  append.toString();
    }


}
